const { select } = require("../db/db")
const add = async (req, res) => {
    let { username, password } = req.query;
    // console.log(username, password);
    let sql = `user`
    let routs = await select(sql);
    let flage;
    routs.forEach(item => {
        if (username == item.name && password == item.password) {
            flage=true;
        }else{
            flage=false;
        }
        // console.log(item.name, item.password);
    })
    res.send(flage);
}
module.exports = {
    add
}